import { sequenceSearch } from "./顺序查找";
import { binarySearch, binarySearch2 } from "./二分查找";
import { testOrderSearchEfficiency } from "hy-algokit";

// const Max_LengTH = 1000000;
// const nums = new Array(Max_LengTH).fill(0).map((_, index) => index);

// const num = Max_LengTH / 2;

// const start = performance.now();
// const index = sequenceSearch(nums, num);
// const endTime = performance.now();
// console.log("顺序查找~索引位置", index, "消耗的时间", endTime - start, "ms");

// const start2 = performance.now();
// const index2 = binarySearch2(nums, num);
// const endTime2 = performance.now();
// console.log("二分查找~索引位置", index2, "消耗的时间", endTime2 - start2, "ms");

// 有序列表的检查，用的why哥的库
testOrderSearchEfficiency(sequenceSearch);
testOrderSearchEfficiency(binarySearch);
testOrderSearchEfficiency(binarySearch2);
